﻿using System;

namespace PageAdmin.Utils
{
    /// <summary>
    /// 第三方登录授权信息描述类
    /// </summary>
    [Serializable]
    public class OAuth2Descriptor
    {
        /// <summary>
        /// openid
        /// </summary>
        public string  OpenId { get; set; }

        /// <summary>
        /// 对应的用户id，如果已经进行过绑定，则必须设置好uid。
        /// </summary>
        public int Uid { get; set; }

        /// <summary>
        /// 是否自动创建用户名
        /// </summary>
        public bool CreateUserName { get; set; } = false;

        /// <summary>
        /// 类型，如qq，微信，支付宝
        /// </summary>
        public string Type { get; set;}

        /// <summary>
        /// 用户名
        /// </summary>
        public string Nickname { get; set; }


        /// <summary>
        /// 性别，值为1时是男性，值为2时是女性，值为0时是未知
        /// </summary>
        public int Sex { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email{ get; set; }

        /// <summary>
        /// 电话号码
        /// </summary>
        public string Mobile{ get; set; }

        /// <summary>
        /// 头像图片地址
        /// </summary>
        public string HeadImage { get; set; }

        /// <summary>
        /// 国家
        /// </summary>
        public string Country { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        public string Province { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        public string City { get; set; }

    }
}
